package model

type GoodsCategory struct {
	CategoryId    int    `json:"categoryId" gorm:"type:bigint;primary_key;not null;autoIncrement"`
	CategoryLevel int    `json:"categoryLevel" gorm:"type:tinyint;not null"`
	ParentId      int    `json:"parentId" gorm:"type:bigint;not null"`
	CategoryName  string `json:"categoryName" gorm:"type:varchar(50);not null"`
	CategoryRank  uint   `json:"categoryRank" gorm:"type:int;not null"`
	IsDeleted     int    `json:"isDeleted" gorm:"type:tinyint(4);not null"`
	CreateTime    Time   `json:"createTime" gorm:"type:datetime;not null;default:current_timestamp"`
	CreateUser    int    `json:"createUser" gorm:"type:int;not null"`
	UpdateTime    Time   `json:"updateTime" gorm:"type:datetime;not null;default:current_timestamp"`
	UpdateUser    int    `json:"updateUser" gorm:"type:int"`
}

// TableName 自定义表明，不适用默认的mall_users
func (receiver GoodsCategory) TableName() string {
	return "tb_newbee_mall_goods_category"
}
